package com.zy.mc_module.ui.micang.setting;

import static android.view.View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
import static android.view.View.SYSTEM_UI_FLAG_LAYOUT_STABLE;

import android.content.Intent;
import android.graphics.Color;
import android.os.Build;
import android.view.View;

import androidx.annotation.NonNull;

import com.hwangjr.rxbus.RxBus;
import com.zy.mc_module.MainActivity;
import com.zy.mc_module.base.kotlin.BaseActivity;
import com.zy.mc_module.common.RxBusCode;
import com.zy.mc_module.databinding.ActivityRiceSettingBinding;
import com.zy.mc_module.ui.micang.RiceContract;
import com.zy.mc_module.ui.micang.RicePresenter;
import com.zy.mc_module.utils.SPUtil;
import com.zy.mc_module.utils.StatusBarUtil;

/**
 * created by Jaygee_vi
 * 2022/10/19
 */
public class MiCangSettingActivity extends BaseActivity<RiceContract.View, RicePresenter, ActivityRiceSettingBinding> {
    @NonNull
    @Override
    public ActivityRiceSettingBinding getViewBinding() {
        return ActivityRiceSettingBinding.inflate(getLayoutInflater());
    }

    @Override
    protected void initView() {
        super.initView();
        StatusBarUtil.setImmersiveStatusBar(this);
        binding.viewTitle.tvTitle.setText("设置");


//        getWindow().setStatusBarColor(Color.TRANSPARENT);
//        getWindow().setNavigationBarColor(Color.TRANSPARENT);
//        getWindow().getDecorView().setSystemUiVisibility(
//                View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_STABLE
//        );

        binding.clMess.setOnClickListener(v -> {
            startActivity(new Intent(this, MiCangSettingMessActivity.class));
        });


        binding.clPhone.setOnClickListener(v -> {
            startActivity(new Intent(this, MiCangSettingPhoneActivity.class));
        });


        binding.clPsw.setOnClickListener(v -> {
            startActivity(new Intent(this, MiCangSettingPswActivity.class));
        });


        binding.clPay.setOnClickListener(v -> {
            startActivity(new Intent(this, MiCangSettingPayActivity.class));
        });

        binding.clPrivate.setOnClickListener(v -> {
            startActivity(new Intent(this, MiCangSettingPrivateActivity.class));
        });

        binding.loginOut.setOnClickListener(v -> {
            SPUtil.clear();
            startActivity(new Intent(context, MainActivity.class));
            RxBus.get().post(RxBusCode.MAIN_POSITION,"3");
        });
        binding.clAbout.setOnClickListener(v -> {

        });

    }
}
